<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>修改图集:<?php echo $row['title']?></title>
<?php include(DEDEMEMBER."/templets/head_inc.htm"); ?>
<script type="text/javascript" language='javascript' src='js/main.js'></script>
<script type="text/javascript" language='javascript' src='js/album.js'></script>
</head>
<body>
<?php include(DEDEMEMBER."/templets/head.htm"); ?>
<div class="wrapper lineT">
  <div class="mainBox">
    <div class="main">
      <?php include(DEDEMEMBER."/templets/menu.php"); ?>
      <div class="dedeMain">
        <div class="location"><span class="titEditChannel2 icon">修改</span>图集</div>
        <form class="mTB10 mR10 mL10" name="form1" action="album_edit.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
          <input type="hidden" name="dopost" value="save" />
          <input type="hidden" name="aid" value="<?php echo $row['id']; ?>" />
          <input type="hidden" name="idhash" value="<?php echo md5($row['id'].$cfg_cookie_encode); ?>" />
          <input type="hidden" name="channelid" value="<?php echo $row['channel']; ?>" />
          <input type="hidden" name="oldlitpic" value="<?php echo $row['litpic']; ?>" />
          <input type="hidden" name="sortrank" value="<?php echo $row['sortrank']; ?>" />
          <input type="hidden" name="imagebody" id="imagebody" value='' />
          <table cellspacing="1" class="submit mB10">
            <thead>
              <tr>
                <th colspan="2" ><strong>常规参数</strong></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td width="15%" align="right" valign="top">图集标题：</td>
                <td><input name="title" type="text" id="title" class="text" size="30" value="<?php echo $row['title']?>" style="width:400px;" />
                  <span style="color:#F00">*</span></td>
              </tr>
              <tr>
                <td align="right" valign="top">标签TAG：</td>
                <td><input name="tags" type="text" id="tags" size="30" class="text" style='width:400px' value="<?php echo GetTags($row['id']); ?>" />
                  (用逗号分开)</td>
              </tr>
              <tr>
                <td align="right" valign="top">作者：</td>
                <td><input name="writer" type="text" id="writer" size="30" style="width:95px;" class="text" value="<?php echo $cfg_ml->M_UserName?>" /></td>
              </tr>
              <tr>
                <td align="right" valign="top">隶属栏目：</td>
                <td><?php
    $typeOptions = GetOptionList($row["typeid"],$row["channel"]);
    echo "<select name='typeid' size='1'>\r\n";
    echo $typeOptions;
    echo "</select>";
		?>
                  <span style="color:#F00">*</span></td>
              </tr>
              <tr>
                <td align="right" valign="top">图集简介：</td>
                <td><textarea name="description" id="description" style="height:50px"><?php echo $row["description"]; ?></textarea>
                  (内容的简要说明) </td>
              </tr>
              <tr>
                <td align="right" valign="top">缩略图：</td>
                <td><input name="litpic" type="file" id="litpic" style="width:408px" onchange="SeePicNew('divpicview',this);"  />
                  <div id='divpicview' class='divpre'></div></td>
              </tr>
              <?php if($row['litpic']!=''){ ?>
              <tr>
                <td align="right" valign="top">原来的缩略图：</td>
                <td><div id='divpicview' class='divpre mTB10 litPic'> <img name="nlitpic"  id="nlitpic" src='<?php  echo $row['litpic'];  ?>'  /></div></td>
              </tr>
              <?php
      }
      //自定义字段
      PrintAutoFieldsEdit($row['fieldset'],$addRow,'autofield');
      ?>
            </tbody>
          </table>
          <input name="maxwidth" type="hidden" id="maxwidth" value="<?php echo $abinfo->GetAtt('maxwidth'); ?>" />
          <input name="prow" type="hidden"  value="<?php echo $abinfo->GetAtt('row'); ?>"  />
          <input name="pcol" type="hidden"  value="<?php echo $abinfo->GetAtt('col'); ?>" />
          <input name="ddmaxwidth" type="hidden" value="<?php echo $abinfo->GetAtt('ddmaxwidth'); ?>" />
          <table cellspacing="1" class="submit">
            <thead>
              <tr>
                <th colspan="2" ><strong>图集内容</strong></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td width="15%" align="right" valign="top">表现方式：</td>
                <td><input name="pagestyle" type="radio" id="pagestyle1" onclick="checkMuList()" value="1" <?php if($abinfo->GetAtt('value')==1) echo " checked='checked'"; ?> />
                  多页多图显示(适用于QQ表情)
                  <input name="pagestyle" type="radio" id="pagestyle2" onclick="checkMuList()" value="2" <?php if($abinfo->GetAtt('value')==2) echo " checked='checked'"; ?> />
                  多页单图显示(幻灯)
                  <input name="pagestyle" type="radio" id="pagestyle3" onclick="checkMuList()" value="3" <?php if($abinfo->GetAtt('value')==3) echo " checked='checked'"; ?>/>
                  多行多列显示(缩略图)
                  <div id='spagelist' style='<?php if($abinfo->GetAtt('value')!=2) echo "display:none"; ?>' class="mTB10"> 每页图片数：
                    <input name='pagpicnum' id='pagpicnum' size='10' class="text" value='<?php echo $abinfo->GetAtt('pagpicnum'); ?>' />
                  </div></td>
              </tr>
              <tr id="handfield">
                <td align="right" valign="top">手工上传：</td>
                <td>
                  <input name="picnum" type="text" id="picnum" size="8" value="3" class="text" />
                  <button class="buttonGary2" name='kkkup' type='button' id='kkkup2' onclick="MakeUpload(0);">追加</button>
                  (最大60幅)
                 </td>
              </tr>
              <tr id="handfield">
                <td align="right" valign="top">&nbsp;</td>
                <td>
                	<div id="uploadfield"></div>
             <?php
       $j = 1;
       if(is_array($dtp->CTags))
       {
       	foreach($dtp->CTags as $ctag){
       		if($ctag->GetName()=="img"){
?>
                  <table width='98%' align="center">
                    <tr>
                      <td height="18"><input type='checkbox' name='isokcheck<?php echo $j; ?>' id='isokcheck<?php echo $j; ?>' value='1' class='np' onclick='CheckSelTable(<?php echo $j; ?>)' checked='1' />
                        显示/隐藏图片[<?php echo $j; ?>]的选框 </td>
                    </tr>
                  </table>
                  <table width="98%" border="0" id="seltb<?php echo $j; ?>" cellpadding="1" cellspacing="1" bgcolor="#E8F5D6" style="margin-bottom:6px;" align="center">
                    <tr bgcolor="#F4F9DD">
                      <td height="25" colspan="2">　<strong>图片</strong></td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td width="450" height="25"> 　本地上传：
                        <input type="file" name='imgfile<?php echo $j; ?>' style="width:330px"  onchange="SeePicNew('divpicview<?php echo $j; ?>',this);" />
                      </td>
                      <td width="164" rowspan="3" align="center"><div id='divpicview<?php echo $j; ?>' class='divpre'></div>
                        <img src="<?php echo trim($ctag->GetInnerText()); ?>" id="picview<?php echo $j; ?>" name="picview<?php echo $j; ?>" /> </td>
                    </tr>
                    <input type="hidden" name='imgurl<?php echo $j; ?>' value='<?php echo trim($ctag->GetInnerText())?>' />
                    <tr bgcolor="#FFFFFF">
                      <td height="56">　图片简介：
                        <textarea name='imgmsg<?php echo $j; ?>' style="height:46px;width:330px"><?php echo trim($ctag->GetAtt('text'))?></textarea>
                      </td>
                    </tr>
                  </table>
                  <?php
$j++;
       		}
       	}
       }
       $dtp->Clear();
?>
                  <span id='uploadfield'></span>
                  <script language="JavaScript">
startNum = <?php echo $j; ?>;
</script>
                </td>
              </tr>
              <tr>
                <td align="right" valign="top">验证码：</td>
                <td><input name="vdcode" type="text" id="vdcode" size="10" class="text" style='width:50px;text-transform:uppercase;' />
                  <img src='../include/vdimgck.php' width='50' height='20' align="absmiddle" /></td>
              </tr>
            </tbody>
            <tfoot>
              <tr>
                <td height="45">&nbsp;</td>
                <td height="45"><button class="button2" type="submit">提交</button>
                  <button class="button2 mL10" type="reset" onclick="location.reload();">重置</button></td>
              </tr>
            </tfoot>
          </table>
        </form>
      </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
  </div>
</div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>
</body>
</html>
